# -*- coding: utf8 -*-
from MySQLdb import *
import _mysql
import MySQLdb
import datetime

def conn():
    conn = MySQLdb.connect(host='localhost',user='root',passwd='760218',db='appfusecore',use_unicode=True,charset='utf8')
    #conn.query('select * from restful')

    curs = conn.cursor()
    curs.execute('select * from restful')

    row = curs.fetchone()

    while row:
        companyname = row[1];
        print row[0],row[1]        
        row = curs.fetchone()


    curs.close();
    conn.close();
    
conn()    
